const express=require('express');
const db=require('../utils/db.js');

const router=express.Router();

router.post('/sellocation',(req,res)=>{
	const sql=`SELECT * FROM location WHERE user_id='${req.body.userid}';`
	db.query(sql,(err,data)=>{
		if(err){
			res.send({msg:err})
		}else{
			res.send(data)
		}
	})
})

module.exports=router;